<template>
	<view class="l_pages">
		<jnavbar title="开通记录"></jnavbar>
		<scroll-view class="page_container tab_page_container" scroll-y>
			<view class="content">
				<view class="content-box">
					<view class="box-item " v-for="(item,i) in dataList" :key="i" @click="tojump(item.id)">
						<view class="item-head">
							<view class="item-time">{{item.create_time}}</view>
							<view class="item-status">成功</view>
						</view>
						<view class="item-content">
							<view class="item-img">
							</view>
							<view class="item-info">
								<view class="item-title">
									开通 VIP{{item.new_level}}
								</view>
								<view class="item-ititle">
									{{item.source}}
								</view>
							</view>
						</view>
						<view class="item-foot">
							<view class="item-title">总计：{{item.money}}</view>
							<view class="item-btn">详情</view>
						</view>
					</view>
				</view>
			</view>

		</scroll-view>
	</view>
</template>

<script>
	import http from '@/common/http.js';
	export default {

		data() {
			return {
				dataList: [],
			}
		},
		async onLoad() {
			await this.$getWx
			this.getDataList()
		},
		methods: {
			getDataList() {
				http('/membership/record', {}, 'get').then(res => {
					this.dataList = res.data.msg
				})
			},
			tojump(id) {
				this.Jumpurl({
					link: '../recordDetails/recordDetails?id=' + id,
					type: 1,
					id
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		padding: 20rpx;
		font-family: PingFang SC;

		.content-box {

			.box-item {
				background: #fff;
				padding: 20rpx;
				margin-bottom: 20rpx;
				border-radius: 10rpx;

				.item-head {
					display: flex;
					justify-content: space-between;
					font-size: 28rpx;
					font-weight: 400;
				}

				.item-content {
					display: flex;
					border-bottom: 1rpx solid #e8e8e8;
					padding: 20rpx 0;

					.item-img {
						width: 160rpx;
						height: 160rpx;
						display: block;
						background: #ccc;
						border-radius: 15rpx;
						overflow: hidden;
					}

					.item-info {
						padding-left: 20rpx;

						.item-title {
							font-size: 32rpx;
							font-weight: bold;
							color: #333;
						}

						.item-ititle {
							font-size: 24rpx;
							color: #666;
						}
					}

				}

				.item-foot {
					padding: 20rpx 0 60rpx;
					text-align: right;
					position: relative;

					.item-title {
						font-size: 32rpx;
						font-weight: bold;
						color: #333;
					}

					.item-btn {
						font-size: 30rpx;
						padding: 4rpx 20rpx 6rpx;
						border-radius: 60rpx;
						border: #333 solid 1rpx;
						position: absolute;
						right: 0;
						top: 70rpx;
					}
				}
			}

		}
	}
</style>
